<template>
	<view class="goods-list rowW gap26">
		<view class="bg-white goods-box pad-20" v-for="(item,index) in list" :key="item.id" @click="hanldeInfo(item)">
			<image class="goods" :src="item.cover"></image>
			<view class="text-center">
				<view class="font-28 mar-top-10 multi1">{{item.name}}</view>
				<view class="centerXY mar-top-10 font-28">
					<view class="color-theme">￥{{item.min_price}}</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "shop-list",
		props: {
			list: {
				type: Array | Object,
				default: () => ([])
			}
		},
		data() {
			return {

			};
		},
		methods: {
			hanldeInfo(item) {
				this.$emit('click', item)
			}
		}
	}
</script>

<style scoped lang="scss">
	.goods-box {
		background: red;
		width: 332rpx;
		background-size: 100% auto;
		background-repeat: no-repeat;
		background-position: bottom;
		border: 1px solid #EEEEEE;
		overflow: hidden;
		box-sizing: border-box;

		.goods {
			display: block;
			width: 288rpx;
			height: 288rpx;
		}
	}
</style>